In mathematics, an X–Y–Z matrix is a generalization of the concept of matrix to three dimensions.
An X–Y–Z matrix will thus have components where
for some positive integers
Such matrices are helpful for example when considering grids in three dimensions, as in computer simulations of three-dimensional problems.